//对b排位
function findMin(n, a, b) {
    let aNum = parseInt(a);
    if (aNum < parseInt(b)) {
        return b;
    }
    let bArr = b.split('');
    let list = new Set(); //满足条件的数组
    console.log(bArr);

    let p = 0; //指针
    let i = 0;
    while (i < n) {
        let temp = '';


        p++;
    }
    //
    if (parseInt(bArr.join('') > parseInt(a))) {
        return bArr.join('');
    }
    // console.log(bArr);
}

console.log(findMin('123', '322'));